package com.ty.user.starter.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

@Data
public class UserRoleDto implements Serializable {

    private static final long serialVersionUID = -2721661924966540640L;
    @ApiModelProperty(name = "用户id", required = true)
    @NotNull(message = "用户id不能为空")
    private Long userId;

    @ApiModelProperty(value = "角色id集合", required = true)
    @NotEmpty(message = "角色id集合不能为空")
    @Size(min = 1, max = 1000, message = "角色设置数量在1~100之间")
    private List<Long> roleIds;
}
